import request from '@/utils/request';
import type { UserInfo } from '@/types';

export const userApi = {
  getUserList: (params: { page: number; pageSize: number }) => {
    return request.get<{ list: UserInfo[]; total: number }>('/user/list', { params });
  },
  
  updateUser: (id: string, data: Partial<UserInfo>) => {
    return request.put(`/user/${id}`, data);
  },
  
  deleteUser: (id: string) => {
    return request.delete(`/user/${id}`);
  }
}; 